home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PRINTER / PROHP.ARJ / READ.ME < prev    next >
Text File  |  1992-06-23  |  18KB  |  516 lines

  1. Dear Clipper programmer,
  2.  
  3. Thank you for downloading ProHP demo.
  4.  
  5. +*******************************************************************+
  6. |                PorHP is the most powerfull                        |
  7. |          laser printer library ever created for                   |
  8. |                     laserjet printers.                            |
  9. +*******************************************************************+
  10.  
  11. This demo contain several demo programs that use ProHP library. You
  12. can not compile them without the library but we included the output of
  13. this program in the files with the same name with the extention .HPC .
  14. One of the unique features of ProHP library is the option to store the
  15. functions results to a string variable which You can (among other
  16. option) save to a file for later use. One exeptional file with this
  17. demo is DOVERLAY.HPC that shows how overlay macro is done and executed
  18. along with page format and box drawing. To see the result of
  19. DOVERLAY.HPC type :
  20.  
  21.         COPY doverlay.hpc+DHMI.PRG /b lpt1
  22.  
  23. You can replace HMI.PRG with any file name. ( Remember to reset the
  24. printer after printing to disable the overlay effect and page format
  25. sets by DOVERLAY.HPC . )
  26.  
  27. To print the result of the demo programs run DEMO.BAT after getting
  28. the result from the printer. Follow the program code and see how ProHP
  29. does all this.
  30.  
  31. This demo shows only "The Tip Of The Iceberg" of ProHP.
  32.  
  33. Following the list of ProHP functions with short description followed
  34. by a list of the sample programs that comes with the library to
  35. demonstrate the use of ProHP functions.
  36.  
  37. ProHP tm developed by I.L.A., Inc., Florida.
  38. (c) Copyright 1992 I.L.A., Inc. All rights reserved.
  39.  
  40. +******************************************************************+
  41.         For More Information and to order call 1-800-374-7734
  42. +******************************************************************+
  43.  
  44. Development and support
  45.  
  46. I.L.A., Inc.
  47. 520 W. Hwy 436 #1180
  48. Altamonte Springs, FL 32714
  49. Tel. (407) 774-7734
  50. Fax. (407) 774-6750
  51.  
  52.  
  53.  
  54. ProHP - Function Summary
  55. -------------------------
  56.  
  57. HP_aatsay( nTop, nLeft, aCstr [,nInc [,cJust]])
  58.  Prints an array of text, left, center or right justify, starting at
  59.  any location on the page, using any font.
  60.  
  61. HP_atsay( [nTop] , [nLeft],cStr[,lRel])
  62.  Prints text anywhere on the page. Specify absolute or relative
  63.  coordinates. You can specify measurements use by row/col, inches or
  64.  centimeter after setting HPsizes().
  65.  
  66. HP_bar( nHeight, nWidth [,nFill [,nGrayPat]] )
  67.  Draw bars at the current cursor position. By changing the size of
  68.  nHeight and nWidth you can draw Horizontal bars, vertical bars and
  69.  rectangles (up to full page size).HP_bar() Uses gray shades and
  70.  patterns
  71.  
  72. HP_box( nTop, nLeft, nHeight, nWidth [,nLineWidth [,nFill at]]])
  73.  Draw box with control on line width, line type and shadow. 
  74.  
  75. HP_center(nTop, nLeft, cStr [,nWidth])
  76.  Center a text over a column/point or in width.
  77.  
  78. HP_callmac(nMid)
  79.  Call a previously defined macro.
  80.  
  81. HP_clrmrg()
  82.  Clear the printer horizontal margins.
  83.  
  84. HP_cols( nCols )
  85.  Sets the number of columns per inch.
  86.  
  87. HP_copies(nCopies)
  88.  Use this command before the print job. You can change the number of
  89.  copies any time you desire. The last setting of nCopies is in effect
  90.  until the next printer reset.
  91.  
  92. HP_data(nIndex, Value)
  93.  HP_data() is used by ProHP for exchange of data between the
  94.  functions.
  95.  
  96. HP_diagtext(nTop,nLeft ,cStr [,nIncTop [,nIncLeft [,lRel] ] ] )
  97.  Print text diagonally, in any angle.
  98.  
  99. HP_endmacro( [nMacroId], [nStat] )
  100.  Close a macro definition.
  101.  
  102. HP_envelope( nEnvType )
  103.  Set the printer for envelope printing.
  104.  
  105. HP_execmacro( nMid )
  106.  Execute a macro.
  107.  
  108. HP_feed( [nFeed] )
  109.  Select source of input paper or envelope. Upper/Lower Tray, manual or
  110.  envelope feeder.
  111.  
  112. HP_fillbox( nTop, nLeft, nHeight, nWidth [,nLineWidth [,nFillBox
  113.         [,nGrayPat]]] )
  114.  This function allows you to draw different types of filled boxes with
  115.  control of line width fill type and shadow.
  116.  
  117. HP_font( cFont [,nAction [,nFontID ] ] )
  118.  This function is designed to handle the process of downloading a soft
  119.  font to the printer while analyzing its format for later use and
  120.  manipulation. ProHP learns the soft font loaded and adjusts its
  121.  environment to fit the use of this font.
  122.  
  123. HP_fontctrl( [nFontID] , nCtrl )
  124.  This function helps you control the fonts downloaded to the printer.
  125.  If your printer memory has low space and you need to optimize the use
  126.  of fonts, this function helps you to remove specific fonts to allow
  127.  space for new ones.
  128.  
  129. HP_hline( nTop, nLeft, nLength [,nLineWidth [,nFill [,nGrayPat]]] )
  130.  Draw horizontal line.
  131.  
  132. HP_hmi( nHmi )
  133.  Fixed spacing fonts are affected by HMI change. When proportional
  134.  fonts are used then only the space character is affected. The default
  135.  HMI is set to the pitch value in the font header.
  136.  
  137. HP_init()
  138.  HP_init() resets HP_data() array to its default. 
  139.  
  140. HP_lmset( nLm )
  141.  Set the left margin
  142.  
  143. HP_lmiset( nLmi )
  144.  Set the left margin in inches.
  145.  
  146. HP_lmcmset( nLmCm )
  147.  Set the left margin in centimeters.
  148.  
  149. HP_lpi( nLpi )
  150.  Set number of Lines Per Inch. This function sets the internal VMI
  151.  setting.
  152.  
  153. HP_macrocmd( nMacroCmd , nMacroId )
  154.  This macro control function lets you define, invoke and delete
  155.  macros.
  156.  
  157. HP_mkshadow( nTop,nLeft,nHeight,nWidth [,nShwdth [,nShfill
  158.         [,nShGrayPat [,nShtype]]]])
  159.  
  160.  Draws a shadow around an imaginary box, ignoring the status of
  161.  HPshadow().
  162.  
  163. HP_moverlay( lSw , nMacroId )
  164.  Enable or Disable automatic overlay action to a macro.
  165.  
  166. HP_orient( nOrient )
  167.  Sets the print direction with respect to the physical page. You can
  168.  use this command only once per page. This command sets the defaults
  169.  of page length, text length, margins, VMI, HMI.
  170.  
  171. HP_pagesize( nPageSize )
  172.  Select the page size used for printing. (Letter, legal, executive, A4)
  173.  
  174. HP_pitch( nPitch, nStyle, cSymbol )
  175.  This function helps you manipulate the Courier font in the printer,
  176.  selecting the pitch, style and symbol set.
  177.  
  178. HP_prdirect( nDir )
  179.  Sets the direction of printing. (works with HP III, PCL 5) this
  180.  command will not print the page out like when changing orientation.
  181.  
  182. HP_rbox( nHeight, nWidth [,nLineWidth [,nFill [,nGrayPat]]])
  183.  Draw a box at the current cursor position.
  184.  
  185. HP_rcpos( nTop ,nLeft ,lRel )
  186.  Set row and column coordinates regardless of HPsizes() status.
  187.  
  188. HP_rcsay( nRow ,nCol, cStr ,lRel )
  189.  This function allows you print at any Row/Column coordinates on the
  190.  page ignoring the state of HPsizes().
  191.  
  192. HP_reset()
  193.  Send a reset command to the printer.
  194.  
  195. HP_rjust()
  196.  Right justify a text.
  197.  
  198. HP_rline( nHeight, nWidth [,nFill [,nGrayPat]] )
  199.  Draw lines at the current cursor position. By changing the size of
  200.  nHeight and nWidth you can draw Horizontal lines, vertical lines and
  201.  rectangles (up to full page size).
  202.  
  203. HP_rmset( nRm )
  204.  Set the right margin.
  205.  
  206. HP_rmiset( nRmi )
  207.  Set the right margin in inches.
  208.  
  209. HP_rmcmset( nRmCm )
  210.  Set the right margin in centimeters.
  211.  
  212. HP_savecsr(),HP_restcsr()
  213.  Push/Pop the current cursor position to/from stack.
  214.  
  215. HP_scalef( nPoint[,nStyle[,nWgt[,cSymbol[,nTypeFace]]]])
  216.  Use scalable fonts.
  217.  
  218. HP_send( lSend )
  219.  HP_send() causes ProHP to switch from sending printer code to the
  220.  output device or returning them as HPC (string variable).
  221.  
  222. HP_setpos( [ nTop ], [ nLeft ], [ lRel ] )
  223.  Control the cursor position, absolute and relative positioning. 
  224.  
  225. HP_stmacro( nMacroId )
  226.  Call this function as the first step in creating a macro. 
  227.  
  228. HP_sub( cStr )
  229.  Prints text in subscript mode.
  230.  
  231. HP_super( cStr )
  232.  Prints text in superscript.
  233.  
  234. HP_symbol( cSymbol )
  235.  Set a symbol set as the default set.
  236.  
  237. HP_textleng( nTextLength )
  238.  This command works with top margin setup and lines per inch and must
  239.  not followed by them. To determine the maximum text length for page,
  240.  use this calculation.
  241.  
  242. HP_tmset( nTopMargin )
  243.  This command designates the number of lines between the top of the
  244.  page to the top of the text area.
  245.  
  246. HP_tmiset( nTMi )
  247.  Set top margin in inches.
  248.  
  249. HP_tmcmset( nTMi )
  250.  Set top margin in centimeters.
  251.  
  252. HP_ulset( lUnderline )
  253.  Set underline mode ON or OFF.
  254.  
  255. HPulstr( cStr )
  256.  Make underlined text.
  257.  
  258. HP_usefont( nFontId )
  259.  Select the font previously downloaded to the printer with nFontID.
  260.  
  261. HP_vline( nTop, nLeft, nLength [,nLineWidth [,nFill 
  262.  Draw vertical line.
  263.  
  264. HP_vmi( nVmi )
  265.  Set Vertical Motion Index to nVmi, This command affect the line feed
  266.  and HP_data(D_LPI) is updated to reflect the new LPI.
  267.  
  268. HP_vprint( nTop, nLeft, cStr , nInc)
  269.  This function takes cStr and prints it vertically starting at
  270.  nTop,nLeft stepping down with nInc.
  271.  
  272. HP_wrap( lWrap )
  273.  When end of line wrap is enabled, any text beyond the right margin
  274.  will be printed on the next line. If disabled, the text after the
  275.  right margin is clipped.
  276.  
  277. HPbold(nStr)
  278.  Make a boldface string. This function will work with any font.
  279.  
  280. HPccm2i( nCm )
  281.  Convert cm to inch. If HPsizes() is set to inches then nCm converted
  282.  to inches.
  283.  
  284. HPci2cm( nInch )
  285.  Convert inch size to centimeter if current sizes used is by
  286.  centimeters.
  287.  
  288. HPcm2col( nCm )
  289.  Convert CM to columns.
  290.  
  291. HPcm2row( nCm )
  292.  Convert CM to rows.
  293.  
  294. HPcol2cm( nCol )
  295.  Convert column coordinate to centimeters.
  296.  
  297. HPcol2i( nCol )
  298.  Get the size of nColumns in inches. This function can also give you
  299.  the length of any fixed space font if HP_cols(font pitch) is set.
  300.  
  301. HPdownload(cFontName [,cLpt [,nFontID [,nSetFont]]])
  302.  HPdownload used for downloading any file in binary mode to the
  303.  printer. You can send previously built forms and letters or any
  304.  printable file, fast. In that case use HPdownload( cFname , cLpt )
  305.  where cFname is the file you want to send to the printer and cLpt the
  306.  output device.
  307.  
  308. HPdrawmonth( dDate, nTop, nLeft, nHeight, nWidth )
  309.  Use this function to draw monthly calendar for any date and in any
  310.  size at any location on the page. The array returned by the function
  311.  can be used to draw or print additional information on any specific
  312.  day of the month.
  313.  
  314. HPfonthead( cFontName )
  315.  This fonts helps you to explore the structure of any soft font.
  316.  
  317. HPgraytext( nStr [,nFill [,nGrayPat [,nHeight]] )
  318.  Print text on gray or pattern background.
  319.  
  320. HPhfont()
  321.  HPhfont is used to get the cell height of the font. This function get
  322.  updates each call to HP_pitch() and call to HP_font(). Use this
  323.  function when you design fine graphics and need to know the exact
  324.  height of the font. You can get this information by reading the font
  325.  description data array with HPfonthead().
  326.  
  327. HPi2col( nInch )
  328.  Get the number of columns in nInch.
  329.  
  330. HPreplicate( cStr , nWidth )
  331.  Used to repeatedly print one or more characters in nWidth.
  332.  
  333. HPsavecsr(), HPrestcsr()
  334.  Use this command when you want to save and restore the cursor
  335.  location. This function returns HPC regardless of HP_send() status.
  336.  
  337. HProw2cm( nRow )
  338.  Convert rows to centimeters.
  339.  
  340. HProw2i( nRow )
  341.  Convert rows to inches.  Useful when mixing row/col coordinates and
  342.  inches.
  343.  
  344. HPscale( nScale )
  345.  This Unique function lets you specify the scale factor for the height
  346.  and width size in the next drawings. This helps you match your output
  347.  to a different area size without having to recalculate the new sizes.
  348.  
  349. HPsetshadow( nShWdth, nShFill ,nShGrayPat ,nShType )
  350.  Alternative way to set new defaults for box shadow.
  351.  
  352. HPshadow( lShadow )
  353.  ProHP will do all the calculations to draw a shadow with the width,
  354.  filltype ,gray/pattern and position. All you need is to set
  355.  HPshadow(.t.).
  356.  
  357. HPsizes( nMeasure )
  358.  Set unit of measure for ProHP functions. Not all functions accept
  359.  measures in cm or row/col.
  360.  
  361. HPstsize( cStr )
  362.  This function positions the text anywhere you like. It is easy to do
  363.  justification (center or right) when you know the text length,
  364.  especially with proportional fonts. This function works with all
  365.  fixed space fonts (even if you change HMI) and with all soft font
  366.  downloaded using HP_font(). Scalable fonts supported with this
  367.  function are CGTIMES and UNIVERSE (resident in HP III)
  368.  
  369. HPwchars( cFont )
  370.  ProHP reads the font file with all the necessary data for the
  371.  different functions needed to handle it. ProHP reads the chars width
  372.  during the process of downloading the font to the printer when using
  373.  HP_font().
  374.  
  375. Set2Print( cDevName )
  376.  Set the output device to cDevName. Use this function before printing.
  377.  
  378. Set2Screen()
  379.  Set the output device to the screen, closing the device opened
  380.  previously with set2print(cDevName)
  381.  
  382. zAddMonth(dDate, nMonths)
  383.  Add/ deduct month(s) from a date.
  384.  
  385. zMdy2Date(nMonth, nDay, nYear)
  386.  make a date from 3 integer vars (nMonth,nDay,nYear).
  387.  
  388.  
  389.  
  390. ProHP - Sample Programs
  391. -------------------------
  392.  
  393. ATSAY.PRG    Shows you the use of HP_atsay() by printing a report
  394.              inside gray shaded box with drop down shadow.
  395.  
  396. BAR.PRG      Another way to look and use relative movement functions.
  397.  
  398. CALENDAR.PRG You are going to love this one. Compile and run it NOW!.
  399.  
  400. COLS.PRG     HP_cols() is very useful and powerful function. This
  401.              program demonstrates one use by drawing a ruler of 15 cm
  402.              marking each millimeter.
  403.  
  404. DIAGTEXT.PRG Demonstrates how to print text diagonally.
  405.  
  406. ENVELOPE.PRG Probably the easiest way to print envelopes. This program
  407.              shows you how to print envelopes by reading addresses
  408.              from a file.
  409.  
  410. FONTS.PRG    This program shows you how to manipulate fonts with ProHP
  411.              functions and select a font using an alias. You may
  412.              modify this program and adopt the technic shown to set
  413.              complicated printer environment setting.
  414.  
  415. FILLBOX.PRG  24 different boxes are filled with gray shade patterns
  416.              and shadow printed using this program.
  417.  
  418. FONTHEAD.PRG Read any given soft font file and display the font
  419.              descriptor data.
  420.  
  421. GRAPH.PRG    Demonstrate how to easily generate bar graphs. Two
  422.              methods are demonstrated here, and you can adopt it to
  423.              your needs immediately.
  424.  
  425. GRAYTEXT.PRG Demonstrates the use of HPgraytext() by printing text
  426.              with different backgrounds (gray shade or pattern). This
  427.              program also show the use of HP_font() to load soft font
  428.              and use them.
  429.  
  430. HMI.PRG      Demonstrate the use of HP_hmi() by showing a way to force
  431.              a 10 pitch font to be printed as 12 pitch and 16.66 pitch
  432.              forced to 20 pitch. also expanding any pitch used with
  433.              any fixed spacing font to any other pitch. an Inch ruler
  434.              is drawn at the background of the text to show the
  435.              behavior of the text when using HP_hmi().
  436.  
  437. HPSCALE.PRG  Unique to ProHP (as many other ideas) is the ability to
  438.              change your drawing size with one call to HPscale().
  439.  
  440. HPSHADOW.PRG Short program to show the use of shadow boxes.
  441.  
  442. LPI.PRG      ProHP allows you to specify any Lines Per Inch count.
  443.              LPI.PRG shows you 4 ways to control and use HP_lpi().
  444.              Find how many lines can be used in a box or any Height,
  445.              Set the number of lines in any Height to fit x number of
  446.              lines in that height. The use of HProw2i() and HPcol2i()
  447.              is demonstrated.
  448.  
  449. MARGINS.PRG  This program demonstrates the use of margin setting by
  450.              showing you how to set margins (by sizes columns, inch or
  451.              centimeter) accurately to a fraction of a tenth of a
  452.              millimeter.
  453.  
  454. ORIENT.PRG   HP_orient is Simple function to change the page
  455.              orientation. This program shows you how to store ProHP
  456.              commands in an array of a string variable for conditional
  457.              operation.
  458.  
  459. PAGESIZE.PRG Control page size. change page size from letter to legal
  460.              and print text on the entire page. print 130 lines of
  461.              text on a legal size paper.
  462.  
  463. PRINV.PRG    This excellent program demonstrates the ease of building
  464.              forms by creating an invoice form and filling it with the
  465.              invoice data. Also you will see how to resize the form by
  466.              ONE (1) command, HPscale(). Also you can see how ProHP
  467.              easily save the invoice format to file and retrieve it
  468.              later fast and exact. Stay on this program there are many
  469.              good ideas to learn here.
  470.  
  471. PUBLISH.PRG  Many functions are used in this program to draw a page of
  472.              text in columns using different font sizes, insert
  473.              monthly calendar and graph in the text column. There is a
  474.              lot to learn from this program. If you understand how
  475.              this program does all this then there is no limit to what
  476.              you can do with ProHP and your printer.
  477.  
  478. RELATIVE.PRG Beautiful program to demonstrate ProHP function that use
  479.              relative movement and at cursor location line draw.
  480.              Compile and run it to get impressed.
  481.  
  482. ROW2CM.PRG   Short program on HProw2cm() and other conversion
  483.              functions.
  484.  
  485. ROW2I.PRG    Convert row to inch. way of using.
  486.  
  487. SCALEF.PRG   Using scalable fonts is easy with ProHP and this program
  488.              shows you how to select a scalable font and use it.
  489.  
  490. SEND.PRG     HP_send() will make your laser printer programming very
  491.              easy. This short program will show you how to use it.
  492.  
  493. SHADOW.PRG   This program will show you many different shadow boxes
  494.              using grays and pattern shadow.
  495.  
  496. SHADOWT.PRG  Draw 9 different boxes showing all shadow types. It also
  497.              shows how to center an array of text inside a box using
  498.              code block.
  499.  
  500. STRSIZE.PRG  Get string size and center it in any width and over a
  501.              column.
  502.  
  503. SUB_SUP.PRG  Text printed in subscript and superscript mode is used in
  504.              this program.
  505.  
  506. SYMBOL.PRG   Small program to show the use of HP_symbol()
  507.  
  508. TEXTLENG.PRG One way of using HP_textleng(). the use of macros is also
  509.              shown here.
  510.  
  511. UNDERLN.PRG  You will find in this program a very Unique way to
  512.              underline text.
  513.  
  514. VPRINT.PRG   Print a text vertically , move relative and center text.
  515. E
  516.